

#ifndef _3DMATH_H
#define _3DMATH_H

#include "3DType.h"
#include "StaticMatrix.h"








Vector3D	build_vector_3D	(Float3D x,Float3D y,Float3D z);
Point3D		build_point_3D		(Float3D x,Float3D y,Float3D z);

Surface3D	build_surface_3D	(Float3D a,Float3D b,Float3D c,Float3D d);
Surface3D	build_surface_3D	(const Point3D& pt1,const Point3D& pt2,const Point3D& pt3);
Line3D		build_line_by_point_3D		(const Point3D& surface_a,const Point3D& surface_b);
Line3D		build_line_3D		(const Surface3D& surface_a,const Surface3D& surface_b);

int			cacl_point_3D		(const Line3D& line,const Surface3D& surface,Point3D* pt);
int			cacl_point_3D		(const Surface3D& surface_a,const Surface3D& surface_b,const Surface3D& surface_c,Point3D* pt);


Vector2D	build_vector_2D		(Float3D x,Float3D y);
Point2D		build_point_2D		(Float3D x,Float3D y);
Line2D		build_line_2D		(Float3D a,Float3D b,Float3D c);
Line2D		build_line_2D		(const Point2D& point_a,const Point2D& point_b);
Segment2D	build_segment_2D	(const Point2D& point_a,const Point2D& point_b);

int			cacl_point_2D		(const Line2D& l1,const Line2D& l2,Point2D* pt);
int			cacl_point_2D		(const Segment2D& seg,const Line2D& l2,Point2D* pt);

#endif